package com.example.sunmiv1.activity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.sunmiv1.R;
import org.application.ClientApplication;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class CompleteActivity extends Activity {

    @BindView(R.id.title_back)
    ImageView titleBack;
    @BindView(R.id.title_title)
    TextView titleTitle;
    @BindView(R.id.complete_money)
    TextView completeMoney;
    @BindView(R.id.complete_complete)
    TextView completeComplete;

    private Context context;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_complete);
        ButterKnife.bind(this);
        context = this;
        titleTitle.setText(context.getResources().getText(R.string.complete_title));
    }

    @OnClick({R.id.title_back, R.id.complete_complete})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
            ClientApplication.finishActivity();
            finish();
            break;
            case R.id.complete_complete:
            ClientApplication.finishActivity();
            finish();
            break;
        }
    }
    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_BACK:
            ClientApplication.finishActivity();
            finish();
            break;
        }
        return super.onKeyUp(keyCode, event);
    }
}
